﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace SmallShop.Services.Code
{
    public class RegexPhone
    {
        private string pattern = "^0((9[0-9])|(1(2[1-9]|6[4-9]|88|99)))[0-9]{7}$";
        public bool CheckPhone(string source)
        {
            Regex regex = new Regex(pattern);
            if (regex.IsMatch(source))
            {
                return true;
            }
            return false;
        }
    }
}
